Search Results: "ashley"

25 July 2007

David Pashley: SIP/Desktop Integration

Dear Lazyweb, I'm possibly asking for the moon on a stick here, but in the office we have VoIP phones, which talk to our Asterisk server. Unfortunately, the ringtone on them are incredibly quiet and I tend to listen to music and don't notice either the ring or the small green flashing light when a call comes in. The question then is does anyone know of a program which will talk SIP to the asterisk server and notice when a call comes in and turn my music down and display a notification?
Read Comments (6)

13 June 2007

David Pashley: Atomic in-place rewriting of files with backup in perl

In my article on Perl's IO::Handle objects I talked briefly about IO::AtomicFile and IO::Digest. I've just had reason to use these very useful modules to create a script which edits a file in place. These modules allowed me to do the rewrite atomically and optionally make a backup if the contents have changed. The example assumes you have a function called perform_rewrite that takes two file handles as the first two parameters.
use File::Copy;
use IO::File;
use IO::AtomicFile;
use IO::Digest;
sub rewrite_file  
   my $file = shift;
   my $sub = shift;
   my $input = new IO::File($file,'r');
   my $input_md5 = new IO::Digest($input, 'MD5');
   my $output = new IO::AtomicFile($file,'w');
   my $output_md5 = new IO::Digest($output, 'MD5');
   $sub->($input, $output, @_);
   if ($input_md5->hexdigest ne $output_md5->hexdigest)  
           copy ("$file", "$file.bak");
           $output->close();
     else  
           # we haven't changed so don't bother updating
           $output->delete();
    
   $input->close();
 
rewrite_file("/foo/bar", \&perform_rewrite, $baz, $quux);
Read Comments (0)

5 June 2007

David Pashley: Biffy Clyro - Puzzle

Currently listening to Biffy Clyro's new album, Puzzle, and I have to say it is definitely their best album yet. It's up there with 65daysofstatic for best album of the year so far. It's made a change from all the recent albums where it's taken repeated listenings to like the album. With the first listen I love this album. I am definitely going to have to see them live more often. I've only seen them twice and the gig a fortnight ago was possibly one of my best gigs ever.
Read Comments (0)

25 April 2007

Brett Parker: Happy Birthday.

Happy birthday David, you old git you ;)

29 March 2007

Benjamin Mako Hill: Dollar Books

One of my favorite weekend activities is spending a Saturday afternoon going through the dollar book carts outside many New York and Boston area used book stores. It's not only because the books are cheap -- although I like that. The dollar book section is the great equalizer of bookstores. A neglected Dickens or Shakespeare can rub out against a discarded Mary-Cate and Ashley teeny-bopper quasi-romance novel. In the best cases, random shelving creates perfect (if unintuitive and ironic) pairs like Run Run Run about Abbie Hoffman and Fun Fun Fun about other youngsters -- a pair I found adjacent in a dollar book section last week.
/copyrighteous/images/run_fun_run.jpg
But you also get to meet books you will never meet in the bookstore sections you normally frequent. The dollar book section at the Strand has introduced me to a whole class of books with intriguing non-fiction sounding titles that I had pulled excitedly off the shelf only to find out that they were, in fact, novels. There are also the books with titles so good you suspect the book will be downhill from that point. The Complete Idiot's Guide To Being a Model (not, as one might expect, Becoming a model) and this guide to the British pierage are great examples.
/copyrighteous/images/british_piers.jpg

27 March 2007

Adrian von Bidder: Samsung D900

David, after the demise of the little joystick of my previous phone (Sony Ericsson T610), I opted for the D900 (at CHF 21.-- plus 2 years, quite a good offer IMHO.) The hardware is very slick, though the display is disappointingly dark if you use the phone outside in bright light (Look at Casio's Exilim cameras for a good example of how a display can be readable even in direct sunlight.) Since I'm using the device as a phone only (and write less than 5 messages per month, usually), I still think it's a nice thing, but... Would I buy that phone again? I don't know. The price was good, and, again, it's still a very slick looking phone. But the firmware designers should be locked up for a few years and forced to write their code with the built in editor or someting like that. But if you expect anything other than to be able to call people over this device: don't go near it. I haven't relly looked at any other phones when I bought it, so I can't compare.

26 March 2007

David Pashley: Sumsung E900 or D900 horror stories

I'm looking to buy either a Samsung E900 or D900 and would like some horror stories on either phone from the LazyWeb. I'm tended towards the E900 as it's a smaller phone, but then the D900 has a better camera. I haven't really felt the need for a camera phone, but the quality is reaching the same as my digital camera, with the exception of not having an optical zoom. Particularly interested in tales of slow or confusing UI and success stories of running an ssh client on it. Not really interested in recommendations of other phones at the moment. That might come later when I discover how bad these phones are.
Read Comments (1)

2 March 2007

MJ Ray: Bad Tech Links for 2007-03-02

NTL blocking web sites?
Is ntl blocking access to thepiratebay or was ntl's Norwich cache broken? (Is this ntl Virgin Media now?)
BBC NEWS World Europe Gorbachev wades into piracy row
How not to make friends and influence people, the Microsoft way. With the result that:
BBC NEWS World Europe Piracy case collapses in Russia
Well, that was always going to happen!
Microsoft standards bid faces failure - Computeract!ve
and while I'm grumbling about Microsoft (which I don't do very often, but I may have a pop at Vista in a week or so), here's Open XML failing to get fast-tracked.
Denmark mandates open standards by 2008
...but they've still got friends in Denmark's standards body.
Random thought: Roomba scare
Self-improvement for Vacuum Cleaners! Now that would be bad tech.
This is a multi-part message in MIME format.
I always sign up for plain text if it's available. HTML-only is a big discouragement. HTML with a useless plain text part like that is nearly always deleted unread. Protx, this means you!
VOIP IP Telephony: Skype dumps you BIOS info and sends home!
Yet another way that Skype is evil. See also:
pagetable.com Skype Reads Your BIOS and Motherboard Serial Number
Internet phones have a lot to answer for, including my imminent router upgrade:
Bagel Belly Blog: Future proof
The browser-awkwardness of the current router's web interface is another reason I'm looking at OpenWRT-like replacements.
FastMail.FM weblog: More greylisting details
Greylisting seems good, but xbl is a terrible blacklist. I don't know how it works and it has often listed new ISP mail relays (which were not open relays or exploited). Avoid xbl.
debian.org and SPAM - MadBlog
Using RBLs to trigger greylisting seems like a good idea to me.
Sue them all.
Finally, this would be funny if it wasn't so silly. Advertisers: be careful of your music placements or you might start a bomb scare. Although, musical bombs? Wouldn't that be a bit of a Hollywood film stunt?

22 February 2007

David Pashley: Comment Counts in Feeds and Updated Entries

Tim Bray just posted an entry about including a comment count in his atom feed. He said that he soon disabled it as people complained that it meant they saw the entry again as an updated entry. As I've recently done the same for my atom feed, I'm confused as to why this is happening. In my case I don't update either <published> or <updated>, just the <content> element. As the guid never changes, readers shouldn't consider it updated. Do readers really take a hash of the contents and consider it updated if it changes? Why do readers ignore the date fields. Is this affecting anyone? Certainly, it doesn't seem to affect Planet or the few readers I've tried it on.
Read Comments (3)

18 February 2007

David Pashley: Ogg Player Redux

After my last post on music players capable of Ogg Vorbis playback, I was recommended: I can discount the iHP120 straight away as it's a HD based player and will be too large for what I want. Update: I'm intentional avoiding any Apple products. iRiver t10
iRiver T10
90GBP will get me a 2GB device. Several people have claimed it works as USB mass storage, although I've seen someone say American versions wouldn't work. iRiver have a firmware updater to convert it to UMS, so I might need to find a Windows installation. It has good battery life of around 45-50 hours from a single AA battery, which is good. It's got good reviews for its sound quality and its rugged construction might make it good in the gym. Kingston K-PEX100
Kingston K-PEX100
A 2GB model will set me back around 65GBP. It's a touch larger, but thinner than the T10. Looks like a UMS device. It can be expanded with miniSD cards, which seems a nice feature. It only has a 17 hour battery time using the internal rechargable, which seems a bit low, considering my CD player will do 120 hours off two AA. Reviews have mentioned that the build quality is a little budget and a couple of firmware bugs, but hopefully these have been fixed now. Samsung's YP-U2
Samsung YP-U2
Can only find a 1GB unit for 60GBP, although there is a 2GB unit available. Battery life is only 14 hours from the internal rechargable battery. It's smaller than the iRiver T10 and is a UMS device. I've seen reviews complain about the audio quality of this device. I think the lack of battery life and audio problems will rule this one out. Cowon iAudio U3 and T2 I wasn't recommended any particular models, but the two I'm considering is the T2 and U3.
iAudio T2
The T2 is a necklace style player, which is rather unusual, but I can pick up a 2GB model for around 100GBP. Battery is around 12 hours using the internal rechargable battery. Looking at the reviews, the supplied headphones make up the actual necklace part and you have to remove that to use your own headphones, which is what I'll be doing, having just bought some Shure E2Cs. They also say the controls are a little confusing.
iAudio U3
This is the most expensive of the products I've looked at at 115GBP for the 2GB model. Battery life is around 20 hours. Reviews have been very positive. Not sure if it's worth the extra price though. Update: Apparently the 2GB model can only be charged via USB, where as the 1GB model comes with a charger too, Also, I read in a review that it has doesn't do gapless playback, which is very annoying. Why don't players do gapless playback? Summary I think my top choice is the iRiver T10, although each of the others have their plus points. The K-PEX is expandable, the T2 is small and the U3 gets good reviews. I think I've discounted the Samsung. I will try and find each of the players in a local shop to have a play before I go out and buy one. If you have any comments on any of these players, or you have another product to recommend I'd be very interested. Oh, and continuing my trend of discovering bands that have split up, I've been getting into At The Drive-In. :S
Read Comments (13)

15 February 2007

David Pashley: Old Style Firefox Tabs

Firefox 2 is an improvement on previous versions, but one thing annoys me is the new tab style. I don't like having a close button on each tab and I don't like it hiding tabs after you have a certain number open. Fortunately you can fix this. Go to about:config in the URL and then set browser.tabs.closeButtons to 3 and browser.tabs.tabMinWidth to 0 and now you should have a close button on the right and all tabs displayed.
Read Comments (3)

6 February 2007

Mark Brown: In plain sight

Even worse than the usual multipart/alternative messages with a contentless text/plain part are messages like that when there quite clearly is a text/plain version of the message (for example, as another option when you sign up for a list) but it’s not been included and this unhelpful “error” has been included. This annoys me: my text mode mail reader is perfectly capable of coping with both multipart/alternative and (via whatever run-mailcap gives it) text/html messages; the error here is entirely in the sending software. It should either include the text/plain version which the sender is already going to the trouble of producing as an alternative in a multipart message or just not bother with the alternative at all. Given the general quality of implementation one finds the reasoning behind providing the alternative is probably that there’s some widely deployed piece of software out there which explodes horribly if it sees HMTL outside of a multipart/alternative wrapper. There are probably some users who are sufficiently keen on seeing the HTML version of the message to mean that they would actively wish to avoid using a plain version of it but there can’t be many - I expect the actual reasoning behind not putting it in is ease of implementation.

David Pashley: This is a multi-part message in MIME format.

Content-Type: multipart/alternative;
        boundary="----=25532899_4522_4927_1140_664401643181"
This is a multi-part message in MIME format.
------=25532899_4522_4927_1140_664401643181
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This message is in MIME format. Since your mail reader does not
understand =
this format, some or all of this message may not be legible.
------=25532899_4522_4927_1140_664401643181
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
No, my mail reader understands it perfectly. It's your crappy mail client that sends out multipart/alternative mails which don't contain alternatives. Fuckers.

5 February 2007

David Pashley: Last.fm Events in Google Calendar

If you use Last.fm, you may have got around to using their events feature where you can search for events near you and mark yourself attending those events. I was manually entering the information into my google calendar, which was a pain. Fortunately, being one of those hip, friendly web2.0 websites, Last.fm allows you to get your data out in all sorts of useful ways, including you event calendar as an iCal file. Google being useful, allow you to display external iCal files in your calendar. Can you see where I'm going with this? To get this up, log into you Google calendar, go to "Manage Calendars", then "Add Calendar", then "Public Calendar Address". Finally type in the url of your last.fm iCal file, which will be http://ws.audioscrobbler.com/1.0/user/dpash/events.ics, although obviously you need to change dpash to your particular last.fm username. Now, you only need to mark yourself attending a gig to have it show up in your Google calendar. You can use something like this to get it into your Evolution calendar.

2 February 2007

MJ Ray: Bad Tech Links for 2007-02-02

"Guidelines for the Secure Operation of the Internet" (RFC1281)
Read it and weep.
Techblogging: DoSing spammers
I've done this in the past, by having a CGI rabbit-hole in a semi-hidden link near the start of the page which just generated 1000s of invalid email addresses. For bonus points, use addresses with MX servers which will never be online again, or maybe with a MX that tarpits and rejects all mail eventually. Get enough points and the spammer will either stop scanning your site or waste a lot of time on you.
Google scanned by spammers [Techblogging]
I don't use pingomatic, but a few of my pages are ranked high enough to attract spammers every time I update them. I think blog spammers probably are using subscription tools to find the most active/most syndicated sites to spam. Can we redesign the tools to defeat them?
BBC News Technology UK Edition: Ads help Google profits triple
But hey, why should Google care about spammers when their externalisation to date is making Google rich?
Techblogging: Web 2.0 security issues incoming
I dislike Web 2.0 so far because it is often inaccessible - this suggests it's often insecure too.
Software Patents Petition
Need more brains... come on, sign the petition, even if it has a bit of hyperbole/invective and a typo or two. Last I heard, it's behind adopting Spandau Ballet's Gold as national anthem, for crying out loud!
The Irascible Professor-commentary of the day 06-07-06. Calculator dependence.
Parents, don't let your children grow up to be calculator junkies!
Zugschlusbeobachtungen: Which kind of software suspend?
I think I heard Matthew Garrett give an interview somewhere (LUG Radio?) which summarised the suspend situation as something like "it works well except when it doesn't." My computer usually software-suspends, but sometimes it crashes and sometimes is often enough to deter me from suspending it often. I really ought to debug it, but it's not a priority yet.
'Cheap and tacky' wedding email that went global - 19 Nov 2006 - National
"The marquee company's CEO, Klaus Jorgensen, said he had sacked the employee responsible - who turned out to be his wife"
NoDaddy.Com - Exposing the Many Reasons Not to Trust GoDaddy with Your Domain Names
"They didn't give me a chance to dispute or resolve the problem -- just a voicemail saying my domain was scheduled for suspension , followed up by a Domain Suspension Notice exactly 52 seconds later. Note that neither of these included a phone number for the abuse department or a reason for the shutdown."
The 'Ow' starts now / freedom bits / greve / Fellows / The Fellowship - Fellowship of FSFE
FSFE's Georg Greve won't be upgrading to Vista, which I saw called "Windows Fista" on the BBC's site - disgruntled journo, over-aggressive MS PR or typo?
BBC NEWS Have Your Say Will you be getting Microsoft Vista?
Nearly 2000 comments, most "No" AFAIS
Microsoft files for patent on "modular operating system"
Microsoft patents Linux?
Hacking gadflies: Marechal, A dystopian future''
Another comment on the MS patent.
BBC NEWS Technology Triple threat targets Word users
While I'm boggling at Microsoft, I hope all their customers saw this little Christmas present from 20 December.
BBC News Technology UK Edition: Sony CD compensation agreed
No Christmas for Sony, remember? They pay out a year or so late.
BBC Trust - On-demand Services' consultation
A remarkable consultation that includes a question "How important is it that the proposed seven-day catch-up service over the internet is available to consumers who are not using Microsoft software?", but the questionnaire doesn't work in all browsers. Do you think this biases the responses? Yes, yes or yes?
Digg - Pressure the BBC to embrace open standards, not just Microsoft technology!
Digg is the new slashdot. Just add hot grits.
BBC News Technology UK Edition: Vista has speech recognition hole
"for the flaw to be exploited the speech recognition feature would need to be activated and configured and both microphone and speakers would have to be switched on." Well, my speakers are embedded in the screen, my microphone doesn't have an on/off switch and I leave it switched on in the mixer so that I can answer the softphone quickly... I doubt I'm the only one who doesn't switch the mic off after every use. Are Microsoft living in the real world any more?

30 January 2007

David Pashley: Pension issues

In the continuing saga I like to call "Dave, what's wrong with your ex-employer today?", I'm still missing large chunks of my pension. Finally had enough of my former employers not giving me any answers or claiming to be looking into it, as I've been asking since around last March. As per this guide, I've started making efforts to resolve the problem myself. The first step has been to formally request a copy of the pension scheme's dispute resolution procedure. I sent them an email last wednesday and hand delivered a letter last night, giving them until the 9th February to supply me with the procedure. If by then they haven't I'll contact the The Pension Advisory Service. I'm hoping it won't come to that, but given the lack of any progress in the past, I'm not holding out much hope.

28 January 2007

David Pashley: Lazy Class Infrastructure

Do you ever feel you should implement equals(), hashCode() and toString, but just can't be bothered to do it for every class? Well, if you aren't bothered by speed, you can use Jakarta Commons Lang to do it for you. Just add this to your class:
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
class Foo  
   public int hashCode()  
      return HashCodeBuilder.reflectionHashCode(this);
    
   public boolean equals(Object other)  
      return EqualsBuilder.reflectionEquals(this,other);
    
   public String toString()  
      return ToStringBuilder.reflectionToString(this);
    
 
And that's it. Your class will just do the right thing. As you can probably guess from the function names, it uses reflection, so may be suboptimal. If you need performance, you can use tell it to use particular members, but I think I'll leave that up to a future article. I also recommend you don't use this technique if you are using something like Hibernate, which does things behind the scenes on member access; you may find it does undesirable things. :)

26 January 2007

David Pashley: Eddie 0.2 RSS and Atom Parser

I noticed today that Mark Pilgrim linked to Eddie, my liberal RSS and Atom parsing library for Java, so I figured I should make a new release. It's been a few months since I did any serious work on the parser, but in the last few days I've reduced the number of test case failures to less than 100 out of 3502 test cases which come as part of Mark's Feedparser parser for python. The majority of the failures are in the date parsing routines and due to bugs in the Jython library which cause literal dictionaries not to match with classes inherited fro PyDictionary. Improvements in this version include:
  • Massively improved support for different character encodings. With Java 6, it also has support for UTF32 feeds.
  • CDF Support.
  • Optional support of TagSoup for sanitizing of HTML in entries.
  • Improved support for different input sources including String, InputStream and byte[].
  • Numerous bug fixes, with 97% of test cases passing, up from 90%
If you use Eddie, drop me an email. I'd like to thank Mark Pilgrim again for providing the community with a fantastic and comprehensive suite of test cases, extensive documentation and a first class Python library.

25 January 2007

David Pashley: Speedy Java 6

I was quietly minding my own business, fixing some encoding bugs in Eddie, my liberal RSS and Atom parser, when I noticed that Java 6 included support for UTF-32, which is one of the encoding tests that was failing. I downloaded and installed the Ubuntu packages and installed it, and decided to run a quick benchmark using my unit tests. First up was the Sun Java 5 JVM. I'd been running the unit tests all night, but timed it this time,and got these results:
Ran 3502 tests
Passed 3322 tests
Failed 180 tests
real    1m10.293s
user    0m40.375s
sys     0m3.632s
Next I tried the Sun Java 6 JVM, using the same jar files and got;
Ran 3502 tests
Passed 3326 tests
Failed 176 tests
real    0m56.059s
user    0m39.198s
sys     0m4.212s
One thing to note was that it spend a couple of seconds noticing new jars to read, so I decided to run it again and got:
Ran 3502 tests
Passed 3326 tests
Failed 176 tests
real    0m45.317s
user    0m34.770s
sys     0m3.516s
Wow, I'd gone from 70 seconds to 45 seconds using the new runtime, and interestingly enough, past 4 more tests in the process. I'm assuming they are the UTF-32 tests, although I have't checked yet. The other thing for me to try is recompiling the code to see if that has any additional benefits. Update: Got around to checking what Java 6 fixed and it turned out it was the additional support for koi-u and cspc862latinhebrew encodings. After I fixed the UTF32 support in Eddie, it passed an additional 16 tests. Down to just 160 out of 3502. I just wish they would add support for some of the stranger encodings. Maybe this will happen when it's open source.

David Pashley: Ogg Player Recommendations and Upcoming Gigs.

Dear Lazyweb, I'm after recommendations of a portable music player, which is small and can play ogg vorbis files. I'm not sure I need something with a large capacity; 2GB should be fine. Basically want something I can use in the gym, so I don't have to listen to the god-awful dance music they keep playing on MTV Dance. Reasonable audio quality a bonus. Last.fm support would be amazing. I would be tempted by something that could run Rockbox, but I suspect they are going to be on the top end of the size scale. Spent some time checking upcoming gigs and I've settled on And You Will Know Us By The Trail Of The Dead, The Killers, 65daysofstatic, and The Barfly's Great Escape mini-festival, 3 days of gigs over 20 venues. Trying to decide if I want to go to see Inspiral Carpets and Electric Six in the world's dirtiest club.

Next.

Previous.